$OpenBSD: patch-modules_db_mysql_my_cmd_c,v 1.3 2015/11/20 10:09:52 sthen Exp $
--- modules/db_mysql/my_cmd.c.orig	Fri Oct  2 15:35:17 2015
+++ modules/db_mysql/my_cmd.c	Mon Oct 19 14:00:40 2015
@@ -24,7 +24,7 @@
  */
 
 /* the following macro will break the compile on solaris */
-#if !defined (__SVR4) && !defined (__sun)
+#if !defined (__SVR4) && !defined (__sun) && !defined (__OpenBSD__)
    #define _XOPEN_SOURCE 4     /* bsd */
 #endif
 #define _XOPEN_SOURCE_EXTENDED 1    /* solaris */
@@ -42,6 +42,7 @@
 #include "../../ut.h"
 #include "../../dprint.h"
 
+#include <sys/types.h>
 #include <strings.h>
 #include <stdio.h>
 #include <time.h>  /*strptime, XOPEN issue must be >=4 */
